//package com.zrrd.yunchmall.order.controller;
//import com.alibaba.csp.sentinel.annotation.SentinelResource;
//import com.zrrd.yunchmall.order.service.OrderServiceImpl;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.Random;
//
///**
// * @author 16837
// */
//@RestController
//public class OrderController2 {
//    @Autowired
//    private OrderServiceImpl orderService;
//    //http://localhost:8081/order/m1
//    @RequestMapping("/order/m1")
//    public String message1() throws InterruptedException { //查询商品信息
//        Random random= new Random();
//
//
//        return orderService.message(1);
//    }
//    @RequestMapping("/order/m2")
//    public String message2(){//下订单或者查询商品信息
//  //      return "Message2!";
//        return orderService.message(2);
//    }
//    @RequestMapping("/order/m3")
//    //热点规则需的资源需要使用SentinelResource定义
//    @SentinelResource("M3")
//    public String message3(String name,int age){
//        return "姓名："+name+",年龄"+age;
//    }
//}
